import React, { PureComponent } from 'react';
import { Card} from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout'; 
import { connect } from 'dva'; 
@connect(({ card, loading }) => ({
  detail: card.currentDetail,
}))
export default class Carddetail extends PureComponent {
  componentDidMount() {
    const { dispatch } = this.props;
    dispatch({
      type: 'card/carddetail',
      payload: this.props.match.params.id,
    });
  }
  render() {
    const { detail } = this.props;
    return (
      <PageHeaderLayout
        title="文章内容详情"
        content="文章内容详情常见于数据项基本的全面信息全面信息。"
      >
        <Card>
          <p>文章标题：{detail.card_deposit}</p>
          <p>发布城市：{detail.register_source}</p>
          <p>过期时间：{detail.cancel_card_date}</p>
          <div>文章内容：<span dangerouslySetInnerHTML = {{ __html:detail.card_type }}></span></div>
        </Card>
      </PageHeaderLayout>
    );
  }
}
